package commands;

import controller.handstates.AbstractState;
import model.Player;

public class CallCommand extends Command {
	
	
	public CallCommand(int seat){
		super(seat);
	}

	@Override
	protected boolean isCmdValid() {
		boolean valid = true;
		//always return true. We will consider calling for 0 chips is calling :)	
		
		return true;
	}

	@Override
	protected void executeImpl() {
		Player p = state.getHandChain().getDealerPlayer();
		System.out.println("Player" + p.getSeat() + " calls, for another " + state.callAmount(p.getSeat()) + " chips");
		p.removeChips(state.callAmount(p.getSeat())); //this also puts the chips on the table, sweee tlolool
		state.getHandChain().getNextPlayer();		
	}
}
